<template>
  <!-- 顶部导航 双向绑定-->
  <div>
    <van-search
      :value="search"
      @change="setSearch"
      fixed
      placeholder="请输入产品信息"
    />
    {{ search }}
  </div>
</template>

<script>
export default {
  props: ['search'],
  methods: {
    setSearch(e) {
      //   this.searchValue =
      this.$emit('transferSearch', e.target.value)
    }
  }
}
</script>

<style lang="less" scoped>
.van-search {
  z-index: 9;
  position: fixed;
  top: 0;
  background-color: #fff;
  .van-search__content {
    width: 351px;
    height: 32px;
    background: #f7f6fb;
    border-radius: 17px;
  }
}
</style>
